-- ================================START====================================
-- Template generated from		FRAMEWORKIVY CODE GENERATOR
-- Generator Version:			<1.0.0.0>
-- Template Creation Time:		<Saturday, 13 August, 2016   12:39:28 AM>
-- Template Modification Time:	<Sunday, 4 September, 2016   12:40:01 AM>
-- Code Generation Time:		<Sunday, 11 September, 2016   1:51:33 AM>
-- Workstation ID:				<PRAVESH>
-- Current system User ID:		<pravesh>
-- Entity/Table Name:			<ContentTypeMaster>
-- Description:					<SQL Server Stored Procedure For GetbyPrimaryKey>
-- Template File:				<IvyGodeGenDefaultTemplate V1.1.xml>

-- Please modify the generated code as per requirement.
-- This code generator is just to speed up the stereo type codes
-- Complex logic needs to be modified manually.

-- This block of comments will not be included in
-- the definition of the procedure.
-- =========================================================================

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'Ivy_SiteAdministration_ContentTypeMaster_GetByID')
	BEGIN
		DROP  Procedure  [Ivy_SiteAdministration_ContentTypeMaster_GetByID]
	END
GO

CREATE PROCEDURE [Ivy_SiteAdministration_ContentTypeMaster_GetByID]
-- =========================================================================
-- Created by				FRAMEWORKIVY CODE GENERATOR
-- Generator Version:		<1.0.0.0>
-- Template version used:   <1.0>
-- Template created by:		<Mrinmoy Das>
-- Code generated by:		<pravesh>
-- Code generation Time:	<Sunday, 11 September, 2016   1:51:33 AM>
-- Entity/Table Name:		<ContentTypeMaster>
-- Description:             <SQL Server Stored Procedure For GetbyPrimaryKey>
-- =========================================================================
-- If Code has been MANUALLY MODIFIED then set below line to TRUE
-- CODE MANUALLY MODIFIED = FALSE
-- =========================================================================

-- Add the parameters for the stored procedure here

	(
				@ContentTypeKey int = NULL 
	) 
AS 
BEGIN 
	-- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements. 
	SET NOCOUNT OFF; 

    SELECT 
			[ContentTypeKey], 
			[ContentTypeCode], 
			[ContentTypeName], 
			[ContentDescription], 
			[ContentTotalNumberOfAttachments], 
			[ContentAttachmentStoreLocationType], 
			[ContentTotalNumberOfImages], 
			[ContentImageStoreLocationType], 
			[ContentTotalNumberOfVideos], 
			[ContentTotalNumberOfAudios], 
			[ContentTotalNumberOfChoiceOptions], 
			[ContentChoiceOptionType], 
			[ContentVisibilityType], 

			[Sys_DateOfCreation], 
			[Sys_DateOfModification], 
			[Sys_CreatedByID], 
			[Sys_ModifiedByID], 
			[Sys_DeleteType], 
			[Sys_IsDeleted], 
			[Sys_OrganizationID], 
			[Sys_InitialPrimaryKeys], 
			[Sys_WorkstationName] 
    FROM 
			[ContentTypeMaster] 
    WHERE 
		( 
			[ContentTypeKey] = @ContentTypeKey 
		); 

END 
GO 

-- =================================END=====================================

